/**
 * radiobox component
 * @author wangqiulin
 */
import { Component, Input, Output, OnInit, EventEmitter, ViewContainerRef, ChangeDetectionStrategy } from '@angular/core';
import { FormControl } from '@angular/forms';

@Component({
    changeDetection: ChangeDetectionStrategy.OnPush,
    selector: 'wf-form-radiobox',
    templateUrl: './template.radiobox.html'
})
export class RadioboxComponent implements OnInit {
    @Input() label: string;
    @Input() value: string | number;
    @Input() name: string;
    @Input() checked: string;
    @Input() disabled: string;
    @Input() size: string;
    @Input() className: string;
    @Input() control: FormControl = new FormControl();
    @Output() modelChange: EventEmitter<string | number> = new EventEmitter<string | number>();

    constructor(private viewRef: ViewContainerRef) {
          // console.log(viewRef.element.nativeElement);
    }

   	get class () {
   		return `radiobox`
   	}

    ngOnInit() {

    }
}
